package com.example.other.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.other.domain.Chat;
import com.example.other.domain.UsersInfo;
import com.example.other.service.ChatService;
import com.example.other.mapper.ChatMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Limhuang
* @description 针对表【chat】的数据库操作Service实现
* @createDate 2024-07-09 14:30:51
*/
@Service
public class ChatServiceImpl extends ServiceImpl<ChatMapper, Chat>
    implements ChatService{

    @Override
    public List<UsersInfo> getChatedUsersByDoctorId(Integer doctorId) {
        return baseMapper.getChatedUsersByDoctorId(doctorId);
    }

    @Override
    public List<Chat> getChatListByDoctorIdAndUserId(Integer doctorId, Integer userId) {
        return baseMapper.getChatListByDoctorIdAndUserId(doctorId, userId);
    }

    @Override
    public List<UsersInfo> getChatedUsersByCosId(Integer cosId) {
        return baseMapper.getChatedUsersByCosId(cosId);
    }
}




